import { isValid } from '@/utils'

export default function usePrice(val: number) {
  if (isValid(val) == false) return '-'
  if (Number.isInteger(val)) return Math.trunc(val)
  return val.toFixed(2)
}
